HitTestEx Method

Returns a reference to the Node object located at the coordinates of x and y. Most often used with drag-and-drop operations to determine if a drop target item is available at the present location.

Syntax

object.HitTestEx(X, Y, Part, Button, Capture, TestRow)

The HitTestEx Method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
X, Y Required. Coordinates of a target object.
Part Optional. Specifies what part of the Node Object the coordinates represent, as described in settings.
Button Optional. A Valid integer that identifies the button that was pressed (MouseDown) or released (MouseUp)
Capture Optional. A valid Boolean value, as described in settings.
TestRow Optional. A valid Boolean value, as described in settings.

Settings

The settings for Part operator are:

Setting Description
[Hit Client Nowhere] In the client area, but below the last item.
[Hit Item Icon] On the bitmap associated with an item.
[Hit Item Label] On the label (string) associated with an item.
[Hit Item Indent] In the indentation associated with an item.
[Hit Item Button] On the button associated with an item.
[Hit Item Right] To the right of the client area.
[Hit Item Check] On the checkbox for a tree view item that is in a user-defined state.
[Hit Client Above] Above the client area.
[Hit Client Below] Below the client area.
[Hit Client Right] To the right of the client area.
[Hit Client Left] To the left of the client area.
[Hit Client LeftAbove] To the left and above the client area.
[Hit Client LeftBelow] To the left and Below the client area.
[Hit Client RightAbove] To the right and above the client area.
[Hit Client RightBelow] To the right and Below the client area.

The settings for Capture operator are:

Setting Description
True Used in conjunction with the button operator to test during a MouseDown or MouseUp event.
False (Default) Only Test coordinates passed.

The settings for TestRow operator are:

Setting Description
True Check entire row for Node object at X,Y coordinates.
False (Default) Node object must be found at X,Y coordinates.

Remarks

If no object exists at the specified coordinates, the HitTestEx method returns Nothing.